package com.dz.finance.api.controller;

import com.dz.finance.biz.service.MemberComService;
import com.dz.finance.biz.vo.CurrentInfoVo;
import com.dz.finance.common.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: DengHaoQi
 * @date: 2024/7/1 15:35
 * @description: 用户模块
 */

@Slf4j
@Api(tags = "用户模块")
@RestController
//@RequestMapping("/adminapi/user")
@RequestMapping("/user")
@RequiredArgsConstructor
public class UserController {

    private final MemberComService memberComService;

    @ApiOperation("获取当前用户信息")
    @GetMapping("/currentUser")
    public Result<CurrentInfoVo> currentUser() {
        CurrentInfoVo currentInfoVo = memberComService.currentUser();
        return Result.ok(currentInfoVo);
    }

}
